package com.adminsystem.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;


import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;
/**
 * 角色表
 *
 * @TableName sys_role
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_role")
@Data
public class SysRole extends BaseEntity {

    /**
     * 角色名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 角色代码
     */
    @TableField(value = "code")
    private String code;


    @TableField(exist = false)
    private List<SysRoleMenu> menuList;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append(", id=").append(super.getId());
        sb.append(", name=").append(name);
        sb.append(", code=").append(code);
        sb.append(", creatTime=").append(super.getCreateTime());
        sb.append(", updateTime=").append(super.getUpdateTime());
        sb.append(", remark=").append(super.getRemark());
        sb.append("]");
        return sb.toString();
    }
}